package Common;

//Arrrrgh Grmbl F**k, no Bitwise calculation with java, need someone to punch

//Here we are, writing lot of BoilerCode, huweeeeeee. 
//How Amazing, 
//
//
//
//
// NOOOOOT
public class IntEnumDirection
{
	public static final int DIRECTION_NONE      = 0;      //0	
	public static final int DIRECTION_TOP 		= 1 << 0; //1
	public static final int DIRECTION_RIGHT 	= 1 << 1; //2
	public static final int DIRECTION_BOTTOM 	= 1 << 2; //4
	public static final int DIRECTION_LEFT 		= 1 << 3; //8
	
	public static final int DIRECTION_ALL       =
		DIRECTION_TOP | DIRECTION_LEFT | DIRECTION_RIGHT | DIRECTION_BOTTOM;
		
	public int m_CurrentDirectionSet = 0;
	
	public int GetCurrentDirectionSet()
	{
		return m_CurrentDirectionSet;
	}
	
	public int SetDirection(int direction)
	{
		m_CurrentDirectionSet |= direction;
		return m_CurrentDirectionSet;
	}
	
	public int UnssetDirection(int direction)
	{
		m_CurrentDirectionSet &= direction;
		return m_CurrentDirectionSet;
	}
	
	public int toggleDirection(int direction)
	{
		m_CurrentDirectionSet ^= direction;
		return m_CurrentDirectionSet;
	}
	
	public int SetTop()
	{
		m_CurrentDirectionSet |= DIRECTION_TOP;
		return m_CurrentDirectionSet;
	}

	public int UnsetTop()
	{
		m_CurrentDirectionSet &= DIRECTION_TOP;
		return m_CurrentDirectionSet;
	}
	
	public int SetBottom()
	{
		m_CurrentDirectionSet |= DIRECTION_BOTTOM;
		return m_CurrentDirectionSet;
	}
	
	public int UnsetBottom()
	{
		m_CurrentDirectionSet &= DIRECTION_BOTTOM;
		return m_CurrentDirectionSet;
	}
	
	public int SetLeft()
	{
		m_CurrentDirectionSet |= DIRECTION_LEFT;
		return m_CurrentDirectionSet;
	}
	
	public int UetLeft()
	{
		m_CurrentDirectionSet &= DIRECTION_LEFT;
		return m_CurrentDirectionSet;
	}
	
	public int SetRight()
	{
		m_CurrentDirectionSet |= DIRECTION_RIGHT;
		return m_CurrentDirectionSet;
	}
	
	public int UnsetRight()
	{
		m_CurrentDirectionSet &= DIRECTION_RIGHT;
		return m_CurrentDirectionSet;
	}
	
	public int SetAll()
	{
		m_CurrentDirectionSet = DIRECTION_ALL;
		return m_CurrentDirectionSet;
	}
	
	public int UnsetDirection()
	{
		m_CurrentDirectionSet = DIRECTION_NONE;
		return m_CurrentDirectionSet;
	}
	
	
	
}

